home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 013 / dd2.arc / DD2.DOC next >
Encoding:
Text File  |  1986-12-17  |  12.4 KB  |  299 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                          DD.COM  Version 2.00
  10.  
  11.  
  12.                      Author:  Robert C. Evans, Jr.
  13.               (C)Copyright P. C. Systems Consultants, 1986
  14.                          All Rights Reserved
  15.  
  16.  
  17.         Directory of Duplicates, hereafter referred to as DD, is a
  18.         program written in MicroSoft C which allows the user to
  19.         perform a directory search for duplicate files across all
  20.         subdirectories.
  21.  
  22.         DD allows you to quickly check for duplication of files on
  23.         your fixed disk.  It becomes necessary to do this since
  24.         grouping in subdirectories lends itself to retaining multiple
  25.         copies of the same file.  The advanced methods used in DD
  26.         allow for extremely fast execution, even though a run time of
  27.         several minutes would be a vast improvement over than listing
  28.         all files on the disk and manually checking for duplication.
  29.  
  30.         The syntax of the command is:
  31.  
  32.                       DD [-bdefh] <drive:pathname>
  33.  
  34.         where:     DD = program name
  35.                     - = program option designator
  36.                     a = ANSI display console
  37.                     b = DOS display console
  38.                     d = check for duplicate directory names
  39.                     e = display only exact duplicates
  40.                     f = format output for Batch file usage
  41.                     h = display help and program information
  42.                     m = format output for Batch file usage (w/marks)
  43.                 drive = any valid DOS drive specification
  44.              pathname = any valid DOS path
  45.  
  46.         All arguments are optional and will be explained further as we
  47.         go along.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.         The simplest form of usage for DD is to change to the
  56.         directory which will serve as the root directory for the
  57.         search, and then type:
  58.  
  59.                               DD
  60.  
  61.         After pressing the enter key, a program heading will appear
  62.         similar to this:
  63.  
  64.             Directory of Duplicates by Robert C. Evans, Jr.
  65.             (C) Copyright 1986    P. C. Systems Consultants
  66.  
  67.         Next would be either a statement that all directory
  68.         information is being read, or the name of a particular
  69.         directory and its path as it is being read.
  70.  
  71.         At this point, directory information from the drive is being
  72.         read and assimilated into a binary tree for comparison
  73.         purposes.  After all directory information has been read and
  74.         processed, the duplicates will be displayed in this format:
  75.  
  76.                FILENAME.EXT  was found in N directories:
  77.                MM/DD/YY HH:MM:SS  #BYTES  ATTRIB  DIRECTORY
  78.  
  79.         where FILENAME.EXT is filename of file found more than once in
  80.         separate subdirectories, N is the number of times the file was
  81.         found, MM/DD/YY HH:MM:SS is the date and time the file was
  82.         last modified, #BYTES is the size of the file in bytes, ATTRIB
  83.         is the files attributes, and DIRECTORY is the directory which
  84.         the file was found in.  The first line, which gives the name
  85.         of the file and number of duplicates, appears once for each
  86.         file found which has duplicates.  The following line will be
  87.         repeated once for each duplicate found.
  88.  
  89.         The time is given in 24 hour format and the attributes are
  90.         reported as:
  91.                              R = Read Only
  92.                              H = Hidden
  93.                              S = System
  94.                              D = Directory
  95.                              A = Archive
  96.  
  97.         This output format is the default.  You may also specify a
  98.         format which is useful for redirecting to a file and creating
  99.         a Batch file for direct manipulation of the files.  There are
  100.         two types which fit into this category.  They are chosen by
  101.         specifying either the F or the M option.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.         The F option lists all the duplicates found in this format:
  110.  
  111.                        drive:\pathname\filename.ext
  112.  
  113.         with the exception that 'drive:' is only output if it was
  114.         specified on the command line, but more about that later.
  115.         '\pathname\' is the directory that 'filename.ext' was found
  116.         in. This line is output once for each duplicate.
  117.  
  118.         The M option lists all the duplicates found in this format:
  119.  
  120.                   * drive:\pathname\filename.ext           #
  121.  
  122.         This is the same as the F option but provides you with two
  123.         unique marks on each line so that you may redirect this the
  124.         output to a file, load the file into a word processing
  125.         program, and perform a global search and replacement of all
  126.         the *'s with one string and all the #'s with another.
  127.  
  128.         These marks do not seem extremely useful at first glance, but
  129.         consider the scenario which drove me to writing the original
  130.         version of this program. Having purchased an IBM XT with a 10
  131.         megabyte fixed disk, I was sure that I would always have and
  132.         abundance of on-line storage, but as most owners of fixed
  133.         disks know, it just isn't so.  After collecting around 1500+
  134.         files in 50+ directories occupying all but 128 bytes of my 10
  135.         megabyte drive (a poor state affairs), I decided to do some
  136.         file management after losing an hours worth of work using a
  137.         program which did not allow for Disk Full errors.  It would
  138.         certainly have expedited the house cleaning process if I had a
  139.         file with the names of all duplicates containing place markers
  140.         which I could globally replace with COPY and/or DEL statements
  141.         so that I could create a .BAT which would free some of the
  142.         wasted space.
  143.  
  144.         The safest usage of replacing the -F format special symbols
  145.         with DOS commands is to use DD to generate a listing of the
  146.         duplicates out to the printer.  Then run DD with the -F format
  147.         and redirect the output to a file with a .BAT extension, which
  148.         you can then selectively edit to achieve the desired results.
  149.         You would be wise to inspect each file you are considering
  150.         deleting before doing such.
  151.  
  152.         The Batch file method of cleaning up is certainly much faster
  153.         than typing in 100 DEL statements (yes, I had over 100
  154.         duplicates, so what if I kept an over abundance of multiple
  155.         copies of my source code, I thought that 10 meg would never
  156.         run out. HA!).
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.         Should you want to check for duplicate sub-directory names on
  165.         a disk, you may specify the D option.  This would treat the
  166.         sub-directory name as a filename for comparison purposes.  A
  167.         file which is named 'DOCUMENT.' would produce a match with a
  168.         sub-directory named 'DOCUMENT', no matter what path these two
  169.         directory entries lie in.  You will notice a difference in the
  170.         number of files compared when DD is executed twice under the
  171.         exact same conditions if one time the D option is utilized and
  172.         the other time it is not.
  173.  
  174.         In the event that you do not want to list all of the files
  175.         sharing only a common name, you may specify the E option,
  176.         which will compare the files name, size, date and time.  You
  177.         still have the option of choosing either of the format options
  178.         if you wish.
  179.  
  180.         The A and B options allow the user to choose which type of
  181.         screen display routines will be used for displaying the
  182.         program heading and program execution information.  Specifying
  183.         the A option states you wish to use the ANSI escape sequences
  184.         The B option is similar with the exception that BIOS output
  185.         routines are utilized.  If neither the A or the B options are
  186.         specified, direct screen I/O is utilized.  All output routines
  187.         use BIOS calls at some point, so BIOS compatibility is a MUST
  188.         for correct operation of this program.  Chances are good,
  189.         however, that DD will still perform correctly on an MS-DOS
  190.         compatible machine.
  191.  
  192.         The H option displays copyright information as well as an
  193.         abridged version of the command syntax and usage.
  194.  
  195.         The DRIVE:PATHNAME option allows you to execute DD from any
  196.         directory while specifying another directory for use as the
  197.         parent or root directory during the file search.
  198.  
  199.         NOTE!  In order to force DD to place a Drive designator at the
  200.         beginning of the pathname you must specify one on the command
  201.         line in the DRIVE: option.  Displaying the drive searched is
  202.         not the default, since I felt this would be redundant.
  203.  
  204.         Since you may wish to obtain a listing of the duplicate files,
  205.         the filename and subdirectory information is output via the
  206.         DOS function 02H.  This allows you to redirect the output to
  207.         either a file or a device, such as the printer.  All program
  208.         heading information as well as any error notices will be
  209.         printed directly to the screen and cannot be redirected.
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.         To obtain a printed listing of your duplicated files, you may
  218.         enter:
  219.                              DD  >PRN
  220.                        or    DD  >LPTx    ( where x is 1 or 2 )
  221.  
  222.         To create a file consisting of your duplicated files, you may
  223.         enter:
  224.                              DD  >filename.ext
  225.  
  226.         where filename is any valid path\filename.ext specification.
  227.  
  228.         To list your duplicated files to the screen without scrolling
  229.         information of the top of the screen, you may enter:
  230.  
  231.                              DD | MORE
  232.  
  233.         where | is the symbol used by DOS to 'pipe' output from DD to
  234.         MORE.COM ( a DOS filter ).
  235.  
  236.         On any of the preceding commands, you may supply DD with any
  237.         of the valid command line arguments previously discussed.  For
  238.         example, you could list all duplicate files and directories at
  239.         and below the root directory on your C: drive which are exact
  240.         matches using ANSI output and redirect the output to the
  241.         printer by entering:
  242.  
  243.                           DD -ade C:\ >PRN
  244.  
  245.         For further information on redirecting/piping output,
  246.         file naming conventions, and DOS filters, consult your DOS
  247.         manual.
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.         NOTE!  DD has been thoroughly tested and debugged on an IBM
  256.         PC/XT with an accompanying 10 meg fixed disk, but no warranty
  257.         or liability in any form or manner is implied or suggested.
  258.         You may experience a NOT ENOUGH MEMORY error which simply
  259.         means you have to many files or to little RAM for memory to be
  260.         able to hold all the directory information for your disk.
  261.  
  262.         COPYRIGHT NOTICE!  DD.EXE (C) 1986 P. C. Systems Consultants,
  263.         All Rights Reserved.  This program is being marketed via the
  264.         ShareWare concept.  This notice hereby gives you permission to
  265.         freely copy and exchange this program and its documentation
  266.         with these stipulations:
  267.  
  268.         You may copy and distribute this program freely, provided
  269.         that:
  270.  
  271.            i.  No fee is charged for such copying and distribution
  272.                without the prior written consent of Robert Evans on
  273.                behalf of Personal Computer Systems Consultants.
  274.  
  275.           ii.  It is distributed ONLY in its original, unmodified
  276.                state which is to include all accompanying files.
  277.  
  278.  
  279.         If you use this program and find it of use, then your
  280.         contribution will be appreciated. You may not use this or any
  281.         other accompanying program in a commercial or government
  282.         organization without paying a registration fee of $10 ($50 for
  283.         bound documentation w/source) which will stimulate the author
  284.         to update and revise this program as needed and to motivate
  285.         him on to developing new software and clothing and feeding his
  286.         eight starving children.
  287.  
  288.         For questions, comments, suggestions or information on any of
  289.         the services available from P. C. Systems Consultants, please
  290.         write to:
  291.                       P. C. Systems Consultants
  292.                       P. O. Box 1996
  293.                       Stone Mountain, GA 30086-1996
  294.  
  295.                       Attention: Robert Evans
  296.  
  297.         In closing I would just like to quote Mr. Bartle & Mr. Jaymes in
  298.         saying "Thank you for your support".
  299.